"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.optionListProps = optionListProps;
exports.treeSelectProps = treeSelectProps;

var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));

var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));

var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));

var _vcSelect = require("../vc-select");

var _omit = _interopRequireDefault(require("../_util/omit"));

var _vueTypes = _interopRequireDefault(require("../_util/vue-types"));

function optionListProps() {
  return {
    prefixCls: String,
    id: String,
    options: {
      type: Array
    },
    flattenOptions: {
      type: Array
    },
    height: Number,
    itemHeight: Number,
    virtual: {
      type: Boolean,
      default: undefined
    },
    values: {
      type: Set
    },
    multiple: {
      type: Boolean,
      default: undefined
    },
    open: {
      type: Boolean,
      default: undefined
    },
    defaultActiveFirstOption: {
      type: Boolean,
      default: undefined
    },
    notFoundContent: _vueTypes.default.any,
    menuItemSelectedIcon: _vueTypes.default.any,
    childrenAsData: {
      type: Boolean,
      default: undefined
    },
    searchValue: String,
    onSelect: {
      type: Function
    },
    onToggleOpen: {
      type: Function
    },

    /** Tell Select that some value is now active to make accessibility work */
    onActiveValue: {
      type: Function
    },
    onScroll: {
      type: Function
    },
    onMouseenter: {
      type: Function
    }
  };
}

function treeSelectProps() {
  var selectProps = (0, _omit.default)((0, _vcSelect.selectBaseProps)(), ['onChange', 'mode', 'menuItemSelectedIcon', 'dropdownAlign', 'backfill', 'getInputElement', 'optionLabelProp', 'tokenSeparators', 'filterOption']);
  return (0, _extends2.default)((0, _extends2.default)({}, selectProps), {
    multiple: {
      type: Boolean,
      default: undefined
    },
    showArrow: {
      type: Boolean,
      default: undefined
    },
    showSearch: {
      type: Boolean,
      default: undefined
    },
    open: {
      type: Boolean,
      default: undefined
    },
    defaultOpen: {
      type: Boolean,
      default: undefined
    },
    value: {
      type: [String, Number, Object, Array]
    },
    defaultValue: {
      type: [String, Number, Object, Array]
    },
    disabled: {
      type: Boolean,
      default: undefined
    },
    placeholder: _vueTypes.default.any,

    /** @deprecated Use `searchValue` instead */
    inputValue: String,
    searchValue: String,
    autoClearSearchValue: {
      type: Boolean,
      default: undefined
    },
    maxTagPlaceholder: {
      type: Function
    },
    fieldNames: {
      type: Object
    },
    loadData: {
      type: Function
    },
    treeNodeFilterProp: String,
    treeNodeLabelProp: String,
    treeDataSimpleMode: {
      type: [Boolean, Object],
      default: undefined
    },
    treeExpandedKeys: {
      type: Array
    },
    treeDefaultExpandedKeys: {
      type: Array
    },
    treeLoadedKeys: {
      type: Array
    },
    treeCheckable: {
      type: Boolean,
      default: undefined
    },
    treeCheckStrictly: {
      type: Boolean,
      default: undefined
    },
    showCheckedStrategy: {
      type: String
    },
    treeDefaultExpandAll: {
      type: Boolean,
      default: undefined
    },
    treeData: {
      type: Array
    },
    treeLine: {
      type: Boolean,
      default: undefined
    },
    treeIcon: _vueTypes.default.any,
    showTreeIcon: {
      type: Boolean,
      default: undefined
    },
    switcherIcon: _vueTypes.default.any,
    treeMotion: _vueTypes.default.any,
    children: Array,
    filterTreeNode: {
      type: [Boolean, Function],
      default: undefined
    },
    dropdownPopupAlign: _vueTypes.default.any,
    // Event
    onSearch: {
      type: Function
    },
    onChange: {
      type: Function
    },
    onTreeExpand: {
      type: Function
    },
    onTreeLoad: {
      type: Function
    },
    onDropdownVisibleChange: {
      type: Function
    },
    // Legacy

    /** `searchPlaceholder` has been removed since search box has been merged into input box */
    searchPlaceholder: _vueTypes.default.any,

    /** @private This is not standard API since we only used in `rc-cascader`. Do not use in your production */
    labelRender: {
      type: Function
    }
  });
}

var Helper = /*#__PURE__*/(0, _createClass2.default)(function Helper() {
  (0, _classCallCheck2.default)(this, Helper);
  this.ReturnOptionListProps = optionListProps();
  this.ReturnTreeSelectProps = treeSelectProps();
});